import HomeView from "@/views/HomeView.vue";


let addr=(routerdata,router)=>{

    let children=[]
    for(var i=0;i<routerdata.length;i++){
        let data=routerdata[i]

        children.push({
            path:data.path,
            name:data.name,
            component:()=>import("../views/"+data.demo)
        })
    }
    router.addRoutes([
        {
            path:"/home",
            name:"home",
            component:HomeView,
            children
        }
    ])
}

export default addr